package com.uzai.console.entity.es;

import com.uzai.common.utils.EsIndexName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

@ApiModel("系统运行日记")
@Document(indexName = EsIndexName.LOGSTASH_API_LOG, shards = 3, replicas = 2)
public class LogstashApiLog implements Serializable {

    private static final long serialVersionUID = -729802319447110978L;

    @ApiModelProperty("主键ID")
    @Id
    @Field(type = FieldType.Keyword)
    private String id;

    @ApiModelProperty("运营商id")
    @Field(type = FieldType.Long)
    private Long merId;

    @ApiModelProperty("设备类型id")
    @Field(type = FieldType.Integer)
    private int deviceType;

    @ApiModelProperty("业务类型")
    @Field(type = FieldType.Integer)
    private int bizType;

    @ApiModelProperty("设备唯一id")
    @Field(type = FieldType.Long)
    private Long deviceUniqueId;

    @ApiModelProperty("会员业务id")
    @Field(type = FieldType.Text)
    private String bizUserId;

    @ApiModelProperty("会员id")
    @Field(type = FieldType.Long)
    private Long userId;

    @ApiModelProperty("报警消息")
    @Field(type = FieldType.Text)
    private String msgInfo;

    @ApiModelProperty("记录时间")
    @Field(type = FieldType.Long)
    private Long logTime;

    @ApiModelProperty("日记id")
    @Field(type = FieldType.Keyword)
    private String traceid;

    @ApiModelProperty("日志类型(正常-INFO; 错误-ERROR)")
    @Field(type = FieldType.Keyword)
    private String level;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Long getMerId() {
        return merId;
    }

    public void setMerId(Long merId) {
        this.merId = merId;
    }

    public int getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(int deviceType) {
        this.deviceType = deviceType;
    }

    public int getBizType() {
        return bizType;
    }

    public void setBizType(int bizType) {
        this.bizType = bizType;
    }

    public Long getDeviceUniqueId() {
        return deviceUniqueId;
    }

    public void setDeviceUniqueId(Long deviceUniqueId) {
        this.deviceUniqueId = deviceUniqueId;
    }

    public String getBizUserId() {
        return bizUserId;
    }

    public void setBizUserId(String bizUserId) {
        this.bizUserId = bizUserId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getMsgInfo() {
        return msgInfo;
    }

    public void setMsgInfo(String msgInfo) {
        this.msgInfo = msgInfo;
    }

    public Long getLogTime() {
        return logTime;
    }

    public void setLogTime(Long logTime) {
        this.logTime = logTime;
    }

    public String getTraceid() {
        return traceid;
    }

    public void setTraceid(String traceid) {
        this.traceid = traceid;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }
}
